// Copyright 2007 the original author or authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package lichen.services;

import lichen.entities.forum.Treeable;

import org.hibernate.Session;
import org.springframework.orm.hibernate3.HibernateTemplate;



/**
 * 对树进行处理的字处理程序
 * @author <a href="mailto:jun.tsai@bjmaxinfo.com">Jun Tsai</a>
 * @version $Revision: 59 $
 * @since 0.0.1
 */
public interface IMoveTreeNodeProcessor {

	/**
	 * 给定的n来进行移动
	 * @param node 需要移动的节点
	 * @param template hibernate template
	 * @param n 需要移动的距离,n>0 时候 向上移动，n<0的时候向下移动
	 * @param clazz 给定的查询类，如果给定的为空，则从node中获取对应的类.
	 * @see Session
	 */
	public void execute(Treeable node,HibernateTemplate template,int n, Class clazz);

}
